package com.ruoyi.room.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.pojo.TbBuildingRoom;
import com.ruoyi.pojo.TbRoom;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 房间表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-08-29
 */
public interface TbRoomMapper extends BaseMapper<TbRoom> {

    @Select("SELECT\n" +
            "  tbm.building_id,\n" +
            "  tbm.buildingBlock_id,\n" +
            "  tbm.unit_id,\n" +
            "  tbm.floor_id,\n" +
            "  tbm.room_id \n" +
            "FROM\n" +
            "  tb_building_room tbm \n" +
            "WHERE\n" +
            "  tbm.building_id = #{id}")
    List<TbBuildingRoom>  getAll(Integer id);
}
